import time
import configparser
from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.chrome.options import Options
import os


driver = webdriver.Chrome()
driver.maximize_window()
driver.implicitly_wait(10)
# url = "https://www.baidu.com"
url = "https://leetcode-cn.com/"
driver.get(url)
# action = ActionChains(driver)
# driver.find_element_by_xpath("//input[@id='kw']").send_keys("python")
#
# driver.find_element_by_id("su").click()
# driver.find_element_by_id("kw").clear()
# time.sleep(10)
# chrome_options = Options()
time.sleep(5)
# driver.find_element_by_xpath("//*[@id='noj-navbar']/div/nav/div[1]/div[3]/a[2]").click()

driver.find_element_by_xpath("/html/body/div[3]/div/div/div/div/div/div[4]/div[1]").click()

driver.find_element_by_xpath("/html/body/div[3]/div/div/div/div/div/div[1]/div/label/input").send_keys("15055432239")
driver.find_element_by_xpath("/html/body/div[3]/div/div/div/div/div/div[2]/div/label/input").send_keys("wwl")
driver.find_element_by_xpath("/html/body/div[3]/div/div/div/div/div/button").click()



text = driver.find_element_by_xpath("/html/body/div[4]/div/div/div").text
print(text)
time.sleep(2)
driver.quit()
